﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UI
{
    public partial class Main : Form
    {
        public int LoginId = 0;
        public Main()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.LoginId = Help.UserInfo.User.E_Id;
            if (this.LoginId == 0)
            {
                MessageBox.Show("你还没有登录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
        }

        private void 竞拍任务ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            teacher.TaskAuction ta = new teacher.TaskAuction();
            ta.Show();
        }

        private void 未完成任务ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            teacher.MyTask ta = new teacher.MyTask();
            ta.Show();
        }

        private void 已完成任务ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            teacher.MyTask ta = new teacher.MyTask();
            ta.Show();
        }

        private void Main_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void 发布任务ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditTask et = new EditTask();
            et.ShowDialog();
        }

        private void 任务管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TaskMain tm = new TaskMain();
            tm.ShowDialog();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            teacher.Main tm = new teacher.Main();
            tm.Show();
        }
    }
}
